<template>
  <div>
    <div>我是组件B</div>
    {{demo}}
    <comC></comC>
  </div>
</template>
 
<script>
import comC from "./grandson";
export default {
  inject: ["for"],
  data() {
    return {
      demo: this.for
    };
  },
  components: {
    comC
  }
};
</script>